package com.ophiux.cs.domain.consultBase.repositories;

import com.ophiux.cs.domain.consultBase.model.entity.Dept;
import com.ophiux.cs.domain.consultBase.model.valueobj.DeptParentResult;
import com.ophiux.cs.domain.consultBase.model.valueobj.DeptQueryObj;
import com.ophiux.cs.domain.consultBase.model.valueobj.DeptResult;
import com.ophiux.utils.exception.OphiuxRepositoryException;

import java.util.List;

public interface IDeptRepository {
	/**
	 * 新增科室
	 * @param dept
	 * @throws OphiuxRepositoryException
	 */
	public void  createDept(Dept dept) throws OphiuxRepositoryException;

	/**
	 * 更新科室
	 * @param dept
	 * @throws OphiuxRepositoryException
	 */
	public void updateDept(Dept dept) throws OphiuxRepositoryException ;

	/**
	 * 删除科室
	 * @param deptId
	 * @throws OphiuxRepositoryException
	 */
	public void deleteDept(String deptId) throws OphiuxRepositoryException ;

	/**
	 * 查询所有科室
	 * @return
	 * @throws OphiuxRepositoryException
	 */
	public List<Dept> selectDept() throws OphiuxRepositoryException ;
	/**
	 * 根据科室ID查询
	 * @param DEPT_ID
	 * @throws OphiuxRepositoryException
	 */
	public Dept getDeptByID(String DEPT_ID) throws OphiuxRepositoryException ;
    /**
     * 查询所有一级科室
     * @return
     * @throws OphiuxRepositoryException
     */
    public List<DeptParentResult> getParentDept(DeptQueryObj dept) throws OphiuxRepositoryException ;
	/**
	 * 查询所有一级科室
	 * @return
	 * @throws OphiuxRepositoryException
	 */
	public int getParentDeptCount(DeptQueryObj dept) throws OphiuxRepositoryException ;
	/**
     * 根据父级ID查询
     * @return
     * @throws OphiuxRepositoryException
     */
    public List<DeptResult> getDeptByParentId(String PARENT_DEPT_ID) throws OphiuxRepositoryException ;

}
